package com.lottery.service.pc28.customService;

import com.lottery.entity.CommunionMsg;

import java.util.ArrayList;

public class CostomerSystem {
	private int id;

	private int count;
	
	ArrayList<CommunionMsg> clientMsg;

	public ArrayList<CommunionMsg> getMessageList() {
		return clientMsg;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	// public Lock getLock() {
	// return lock;
	// }
	//
	// public void setLock(Lock lock) {
	// this.lock = lock;
	// }

	public CostomerSystem() {
		this.clientMsg = new ArrayList<CommunionMsg>();
	}

	public CostomerSystem(int id) {
		this.id = id;
		this.count = 0;
		this.clientMsg = new ArrayList<CommunionMsg>();
		// lock = new ReentrantLock();
		initial();
	}

	public void ServerCountAdd() {
		count++;
	}

	public void ServerCountReduce() {
		if (count > 0)
			count--;
	}

	void initial() {
	}

}
